<script language="javascript" type="text/javascript" src="/assets/My97DatePicker/jquery-1.8.2.js"></script>
<script language="javascript" type="text/javascript" src="/assets/libs/fastadmin-layer/dist/layer.js"></script>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" enctype="multipart/form-data">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">标题:</label>
        <div class="col-xs-12 col-sm-8" style="width:410px;">
            <input id="c-title" class="form-control" name="c_title" type="text" >
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">图片上传:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c_img"  name="c_pic" type="file">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">栏目说明:</label>
        <div class="col-xs-12 col-sm-8" >
            <textarea id="info" name="c_info" style="width:400px;"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">状态:</label>
        <div class="col-xs-12 col-sm-8">
            <input  name="status"  value="0" type="radio" checked="checked">正常
            <input  name="status"  value="1" type="radio">停用
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">模板类型:</label>
        <div class="col-xs-12 col-sm-8">
           <select name="show_type" style="height:35px;">
               {volist name="scolumn_ctype" id="vo" key="k"}
                    <option value="{$k-1}" >{$vo}</option>
               {/volist}
           </select>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-success btn-embossed" onclick="sub();">添加</button>
            <a  href="/admin/scolumn/index?fid={$fid}" class="btn btn-default btn-embossed">返回</a>
        </div>
    </div>
</form>

<script language="JavaScript">

    function sub() {
        var title=$("#c-title").val();
        if(title==''){
            layer.msg("标题不得为空");
            return;
        }
        $("#add-form").submit();

    }

</script>



